package com.bw.liuyushan.mykotlin_firstmvptest.Adapter

import com.bumptech.glide.Glide
import com.bw.liuyushan.mykotlin_firstmvptest.MVP.Entity.Data
import com.bw.liuyushan.mykotlin_firstmvptest.MVP.Entity.Food
import com.bw.liuyushan.mykotlin_firstmvptest.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import kotlinx.android.synthetic.main.rv_food_layout.view.*

/**
 *MyKotlin_FirstMVPTest
 *file name is : FoodAdapter2
 *created by Ender on 2021/9/16 19:43.
 *author : 刘雨杉
 *Describe:
 */
class FoodAdapter2(id :Int,data: List<Data>)  : BaseQuickAdapter<Data,BaseViewHolder>(id,data){

    override fun convert(helper: BaseViewHolder?, item: Data) {
        helper!!.setText(R.id.rv_title,item.title)
        Glide.with(mContext).load(item.pic).into(helper.getView(R.id.rv_pic))
    }
}